! 模块传递变量
module env

    implicit none
    integer :: a

end module env

program main

    use env
    implicit none
    external :: set_value

    call set_value()
    print *, a

end program main

impure subroutine set_value()
    use env

    a = 1

end subroutine set_value
